package org.springcloud.wisdom.springcloud_03_freshman.student.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springcloud.wisdom.springcloud_03_freshman.student.entity.Card;

@Mapper
public interface CardDao {
    @Insert("insert into card(sid,user,location,time) values (#{sid},#{user},#{location},#{time})")
    public int addCard(Card card);

    @Update("update card set location=#{location},time=#{time} where sid=#{sid}")
    public int updateCard(Card card);

    @Select("select * from card where sid=#{sid}")
    public Card getCardBySid(String sid);
}
